package string;

/**
 * 字符串频繁修改会性能损耗
 * @author Administrator
 */
public class StringBuilderDemo1 {
    public static void main(String[] args) {
        String str = "a";
        StringBuffer builder = new StringBuffer(str);
        for (int i = 0; i <1000000 ; i++) {
            builder.append("a");
        }
        System.out.println("执行完了!");
    }
}
